package cn.rokhdelar.ams.business.biz.projectbaseflow.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.Date;

/**
 * 流程审核记录表实体类
 */
@Data
@TableName("biz_audit_record")
@Schema(description = "流程审核记录实体")
public class AuditRecord {

    @TableId(type = IdType.AUTO)
    @Schema(description = "主键ID", example = "1")
    private Long id;

    @TableField("process_instance_id")
    @Schema(description = "流程实例ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "proc123456")
    private String processInstanceId;

    @TableField("task_id")
    @Schema(description = "任务实例ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "task7890")
    private String taskId;

    @TableField("task_def_key")
    @Schema(description = "节点定义ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "managerAudit")
    private String taskDefKey;

    @TableField("auditor")
    @Schema(description = "审核人", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    private String auditor;

    @TableField("audit_result")
    @Schema(description = "审核结果", requiredMode = Schema.RequiredMode.REQUIRED,
            allowableValues = {"pass", "reject"}, example = "pass")
    private String auditResult;

    @TableField("audit_comment")
    @Schema(description = "审核意见", example = "同意该项目进行下一步审批")
    private String auditComment;

    @TableField("audit_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "审核时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-07-18 15:30:00")
    private Date auditTime;

    @TableField("audit_type")
    @Schema(description = "审核类型", example = "经理审核")
    private String auditType;

    @TableField(value = "create_time", fill = com.baomidou.mybatisplus.annotation.FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "记录创建时间", example = "2024-07-18 15:30:00")
    private Date createTime;

    @TableField(value = "update_by", fill = com.baomidou.mybatisplus.annotation.FieldFill.INSERT_UPDATE)
    @Schema(description = "更新者", example = "李四")
    private String updateBy;

    @TableField(value = "update_time", fill = com.baomidou.mybatisplus.annotation.FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间", example = "2024-07-18 16:45:00")
    private Date updateTime;

    @TableField("remark")
    @Schema(description = "备注信息", example = "该记录为项目首次审核")
    private String remark;

    @TableField(value = "create_by", fill = com.baomidou.mybatisplus.annotation.FieldFill.INSERT)
    @Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED, example = "系统管理员")
    private String createBy;
}
    